<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>26. Development Tools &mdash; Python v2.6.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.6.2',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v2.6.2 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v2.6.2 documentation" href="../index.html" />
    <link rel="up" title="The Python Standard Library" href="index.html" />
    <link rel="next" title="26.1. pydoc — Documentation generator and online help system" href="pydoc.html" />
    <link rel="prev" title="25.6. Other Graphical User Interface Packages" href="othergui.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="pydoc.html" title="26.1. pydoc — Documentation generator and online help system"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="othergui.html" title="25.6. Other Graphical User Interface Packages"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v2.6.2 documentation</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="development-tools">
<span id="development"></span><h1>26. Development Tools<a class="headerlink" href="#development-tools" title="Permalink to this headline">¶</a></h1>
<p>The modules described in this chapter help you write software.  For example, the
<a title="Documentation generator and online help system." class="reference external" href="pydoc.html#module-pydoc"><tt class="xref docutils literal"><span class="pre">pydoc</span></tt></a> module takes a module and generates documentation based on the
module&#8217;s contents.  The <a title="Test pieces of code within docstrings." class="reference external" href="doctest.html#module-doctest"><tt class="xref docutils literal"><span class="pre">doctest</span></tt></a> and <a title="Unit testing framework for Python." class="reference external" href="unittest.html#module-unittest"><tt class="xref docutils literal"><span class="pre">unittest</span></tt></a> modules contains
frameworks for writing unit tests that automatically exercise code and verify
that the expected output is produced.  <strong>2to3</strong> can translate Python 2.x
source code into valid Python 3.x code.</p>
<p>The list of modules described in this chapter is:</p>
<ul>
<li class="toctree-l1"><a class="reference external" href="pydoc.html">26.1. <tt class="docutils literal"><span class="pre">pydoc</span></tt> &#8212; Documentation generator and online help system</a></li>
<li class="toctree-l1"><a class="reference external" href="doctest.html">26.2. <tt class="docutils literal"><span class="pre">doctest</span></tt> &#8212; Test interactive Python examples</a><ul>
<li class="toctree-l2"><a class="reference external" href="doctest.html#simple-usage-checking-examples-in-docstrings">26.2.1. Simple Usage: Checking Examples in Docstrings</a></li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#simple-usage-checking-examples-in-a-text-file">26.2.2. Simple Usage: Checking Examples in a Text File</a></li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#how-it-works">26.2.3. How It Works</a><ul>
<li class="toctree-l3"><a class="reference external" href="doctest.html#which-docstrings-are-examined">26.2.3.1. Which Docstrings Are Examined?</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#how-are-docstring-examples-recognized">26.2.3.2. How are Docstring Examples Recognized?</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#what-s-the-execution-context">26.2.3.3. What&#8217;s the Execution Context?</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#what-about-exceptions">26.2.3.4. What About Exceptions?</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#option-flags-and-directives">26.2.3.5. Option Flags and Directives</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#warnings">26.2.3.6. Warnings</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#basic-api">26.2.4. Basic API</a></li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#unittest-api">26.2.5. Unittest API</a></li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#advanced-api">26.2.6. Advanced API</a><ul>
<li class="toctree-l3"><a class="reference external" href="doctest.html#doctest-objects">26.2.6.1. DocTest Objects</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#example-objects">26.2.6.2. Example Objects</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#doctestfinder-objects">26.2.6.3. DocTestFinder objects</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#doctestparser-objects">26.2.6.4. DocTestParser objects</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#doctestrunner-objects">26.2.6.5. DocTestRunner objects</a></li>
<li class="toctree-l3"><a class="reference external" href="doctest.html#outputchecker-objects">26.2.6.6. OutputChecker objects</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#debugging">26.2.7. Debugging</a></li>
<li class="toctree-l2"><a class="reference external" href="doctest.html#soapbox">26.2.8. Soapbox</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="unittest.html">26.3. <tt class="docutils literal"><span class="pre">unittest</span></tt> &#8212; Unit testing framework</a><ul>
<li class="toctree-l2"><a class="reference external" href="unittest.html#basic-example">26.3.1. Basic example</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#organizing-test-code">26.3.2. Organizing test code</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#re-using-old-test-code">26.3.3. Re-using old test code</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#classes-and-functions">26.3.4. Classes and functions</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#testcase-objects">26.3.5. TestCase Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#testsuite-objects">26.3.6. TestSuite Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#testresult-objects">26.3.7. TestResult Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="unittest.html#testloader-objects">26.3.8. TestLoader Objects</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="2to3.html">26.4. 2to3 - Automated Python 2 to 3 code translation</a><ul>
<li class="toctree-l2"><a class="reference external" href="2to3.html#using-2to3">26.4.1. Using 2to3</a></li>
<li class="toctree-l2"><a class="reference external" href="2to3.html#module-lib2to3">26.4.2. <tt class="docutils literal"><span class="pre">lib2to3</span></tt> - 2to3&#8217;s library</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="test.html">26.5. <tt class="docutils literal"><span class="pre">test</span></tt> &#8212; Regression tests package for Python</a><ul>
<li class="toctree-l2"><a class="reference external" href="test.html#writing-unit-tests-for-the-test-package">26.5.1. Writing Unit Tests for the <tt class="docutils literal"><span class="pre">test</span></tt> package</a></li>
<li class="toctree-l2"><a class="reference external" href="test.html#running-tests-using-test-regrtest">26.5.2. Running tests using <tt class="docutils literal"><span class="pre">test.regrtest</span></tt></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="test.html#module-test.test_support">26.6. <tt class="docutils literal"><span class="pre">test.test_support</span></tt> &#8212; Utility functions for tests</a></li>
</ul>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="othergui.html"
                                  title="previous chapter">25.6. Other Graphical User Interface Packages</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="pydoc.html"
                                  title="next chapter">26.1. <tt class="docutils literal"><span class="pre">pydoc</span></tt> &#8212; Documentation generator and online help system</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/library/development.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pydoc.html" title="26.1. pydoc — Documentation generator and online help system"
             >next</a> |</li>
        <li class="right" >
          <a href="othergui.html" title="25.6. Other Graphical User Interface Packages"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v2.6.2 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; <a href="../copyright.html">Copyright</a> 1990-2009, Python Software Foundation.
      Last updated on Apr 15, 2009.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
    </div>
  </body>
</html>